import request from "@/api/request";

/**
 * 商品列表页
 * @returns
 */
function goodsList(data) {
  return request({
    url: "/goods/goodsList",
    data,
  });
}

/**
 * 商品详情
 * @param {*} data
 * @returns
 */
function detailaction(data) {
  return request({
    url: "/goods/detailaction",
    data,
  });
}

/**
 * 添加收藏
 * @param {*} data
 * @returns
 */

function addcollect(data) {
  return request({
    url: "/collect/addcollect",
    method: "POST",
    data,
  });
}

/**
 * 添加购物车
 * @param {*} data
 * @returns
 */
function addCart(data) {
  return request({
    url: "/cart/addCart",
    method: "POST",
    data,
  });
}

export { goodsList, detailaction, addcollect, addCart };
